<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let arr = [44, 55, 66, 88, 100];
      let sum = 0,
        average = 0;
      let max = arr[0],
        min = arr[0];
      for (let i = 0; i <= 4; i++) {
        console.log(arr[i]);
        sum += arr[i];
        if (max < arr[i]) {
          max = arr[i];
        }
        if (min > arr[i]) {
          min = arr[i];
        }
      }
      console.log(`平均值是${sum / arr.length}`);
      console.log(`最大值为${max},最小值为${min}`);
    </script>
  </body>
</html>
